package br.com.news.service.interfaces;

import java.util.List;

import br.com.news.exception.NoResultException;
import br.com.news.exception.ServiceException;
import br.com.news.modal.CategoriaBean;

public interface ICategoriaService {
	
	long salvar(CategoriaBean categoriaBean) throws ServiceException;
	
	void atualizar(CategoriaBean categoriaBean) throws ServiceException;
	
	long inserir(CategoriaBean categoriaBean) throws ServiceException;
	
	int deletar(long idCategoria) throws ServiceException;
	
	CategoriaBean findId(long idCategoria) throws ServiceException;
	
	List<CategoriaBean> findAll() throws ServiceException;
	
	void fechar();
	
	/**
	 * Busca categorias selecionadas pelo usuário
	 * 
	 * @return List<CategoriaBean>
	 * @throws ServiceException
	 */
	List<CategoriaBean> buscaCategoriasSelecionadas() throws ServiceException, NoResultException;
	
	/**
	 * Sincroniza as categorias com o servidor.
	 * 
	 * @return List<CategoriaBean>
	 * @throws ServiceException
	 */
	void sincronizar() throws ServiceException;
}
